#ifndef __MATRIX_DEF_H__
#define __MATRIX_DEF_H__

#ifdef _USING_INTEL_MKL
#define EIGEN_USE_MKL_ALL
#endif

#include <Eigen/Core>
#include <Eigen/Dense>
#include <Eigen/IterativeLinearSolvers>
#include <Eigen/Sparse>

using namespace Eigen;

#ifndef __MATRIX_DEFINED__
#define __MATRIX_DEFINED__

template <typename T>
using matrix_t = Matrix<T, Dynamic, Dynamic>;

template <typename T>
using compressed_matrix_t = SparseMatrix<T>;
//template <typename T> using compressed_matrix_t = SparseMatrix<T, RowMajor>;

template <typename T>
using diagonal_matrix_t = DiagonalMatrix<T, Dynamic>;

template <typename T>
using vector_t = Matrix<T, Dynamic, 1>;

template <typename T>
using compressed_vector_t = SparseVector<T>;
//template <typename T> using compressed_vector_t = SparseVector<T, RowMajor>;

// #include <Eigen/StdVector>  // // using aligned std::vector
// template <typename T>
// using aligned_vector_t = std::vector<T, Eigen::aligned_allocator<T>>;

#include <boost/align/aligned_allocator.hpp> // using aligned std::vector
template <typename T, int alignment=16>
using aligned_vector_t = std::vector<T, boost::alignment::aligned_allocator<T, alignment>>;

#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif

#endif // __MATRIX_DEFINED__

#endif // __MATRIX_DEF_H__